<p>
<?php foreach ($rows->result() as $ym): ?>
    <?php $at = explode('@', $ym->email) ?>
    <?php if ($at[1] == 'yahoo.com' || $at[1] == 'yahoo.co.id'): ?>
        <a href="ymsgr:sendIM?<?php echo $at[0] ?>"><img src="http://opi.yahoo.com/online?u=<?php echo $at[0] ?>&amp;m=g&amp;t=14" border="0">
    <?php else: ?>          
        <a href="ymsgr:sendIM?<?php echo $ym->email ?>"><img src="http://opi.yahoo.com/online?u=<?php echo $ym->email ?>&amp;m=g&amp;t=14" border="0">
    <?php endif ?>        
<?php endforeach ?>
</p>
<?php echo anchor('yms/index', 'Back') ?>
         